<!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<title>搜索收入</title>
$!{include("import_js_css.html")}
$!{include("import_tab_switch.html")}
</head>

<body>
	$!{include("header.html")}
	<div class="container menu_all">
		<div id="div_ul_tab" class="tabbable tabs-left panel-db-cdt">
			$!{include("tab.html")}
			<div class="tab-content panel-radius-search-all panel-search">
				<div class="tab-pane active panel-search-cdts" id="panel-product">
					<div id="productFormGroup">
						<form class="form-horizontal" role="form" name="rechargeForm"
							action="yueyogaAdmin/searchRecharge.jhtml"
							method="post">
							<div id="product_search_cdts" class="form-group">
								<label for="inputLogType" class="col-sm-1 control-label">类型</label>
								<div class="col-sm-3">
									<select id="inputLogType"
										class="selectpicker show-tick" data-width="100%" name="logType">
										<option value=""> </option>
										<option value="">全部</option>
										<option value="充值">充值</option>
										<option value="提现">提现</option>
									</select>
								</div>
								<label for="inputMember" class="col-sm-1 control-label">会员</label>
								<div class="col-sm-3">
									<!--#var(Member member,List<Member> memberList)-->
									<select id="inputMember" data-live-search="true"
										class="selectpicker show-tick" data-width="100%" name="memberId">
										<option value=""> </option>
										<option value="">全部</option>
										<!--#foreach(member in memberList)-->
											<option value="${member.memberid}">
											<!-- #if(member.cardnumber!=null) -->
											${member.cardnumber}-${member.name}
											<!-- #else -->
											${member.name}
											<!-- #end --></option>
										<!-- #end -->
									</select>
								</div>
								<br /> <br />
								<label for="inputUser" class="col-sm-1 control-label">负责人</label>
								<div class="col-sm-3">
									<!--#var(GroupUserModel user,List<GroupUserModel> userList)-->
									<select id="inputUser" data-live-search="true"
										class="selectpicker show-tick" data-width="100%" name="userId">
										<option value=""> </option>
										<option value="">全部</option>
										<!--#foreach(user in userList)-->
											<option value="${user.id}">${user.name}</option>
										<!-- #end -->
									</select>
								</div>
								<label for="inputMinMoney" class="col-sm-1 control-label">金额</label>
								<div class="col-sm-1">
									<input type="text" class="form-control" style="width:80px;" name="minMoney" id="inputMinMoney" value="${minMoney}">
								</div>
								<label for="inputMaxMoney" class="col-sm-1" style="width: 30px; margin-top:7px; margin-left:22px;font-weight:100;">至</label>
								<div class="col-sm-1">
									<input type="text" class="form-control" style="width:80px;" name="maxMoney" id="inputMaxMoney" value="${maxMoney}">
								</div>
								<br /> <br />
								<br /> <br />
								<label for="inputMinTime" class="col-sm-1 control-label">充值日期</label>
								<div class="col-sm-3">
									<div class='input-group date' id='inputMinTime' data-date-format="YYYY-MM-DD">
					                    <input name="minTime" type="text" class="form-control" style="background-color:#fff;" value="${minTime}"/>
					                    <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
					                </div>
					                <script type="text/javascript">
					                $("#inputMinTime").datetimepicker({
					        			language: "zh-CN",
					        			pickTime: false
					        		});
					                </script>
								</div>
								<label for="inputMaxTime" class="panel-searh-zhi">至</label>
								<div class="col-sm-3">
									<div class='input-group date' id='inputMaxTime' data-date-format="YYYY-MM-DD">
					                    <input name="maxTime" type="text" class="form-control" style="background-color:#fff;" value="${maxTime}"/>
					                    <span class="input-group-addon"><span class="glyphicon glyphicon-time"></span></span>
					                </div>
					                <script type="text/javascript">
					                $("#inputMaxTime").datetimepicker({
					        			language: "zh-CN",
					        			pickTime: false
					        		});
					                </script>
								</div>
								<input type="hidden" name="pageNo" id="hidPageNo" />
								<input type="hidden" value="block" name="display"/>
								<div class="panel-db-search">
									<button id="btn_product_search" type="submit" class="btn btn-default btn-ade-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
					<script type="text/javascript">
					
					$(document).ready(function(){
						
						$("#inputLogType").select2({
							width: "100%",
							minimumResultsForSearch: -1
						});
						
						$("#inputMember").select2('val', '${memberId}');
						$("#inputUser").select2('val', '${userId}');
						$("#inputLogType").select2('val', '${logType}');
						
						//判断最小金额文本框只能输入数字
						$("#inputMinMoney").keyup(function(){
							var comment = $("#inputMinMoney").val();
							var reg = /^\d+$/;
							if(!reg.test(comment)){
								$("#inputMinMoney").val('${minMoney}');
							}else{}
						});
						//判断最大金额文本框只能输入数字
						$("#inputMaxMoney").keyup(function(){
							var comment = $("#inputMaxMoney").val();
							var reg = /^\d+$/;
							if(!reg.test(comment)){
								$("#inputMaxMoney").val('${maxMoney}');
							}else{}
						});
						
						$('.div_search_result').hide();
					});
					</script>
				</div>
			</div>
		</div>
		<div class="div_search_result">
			$!{include("rechargeLog_list.html")}
		</div>
	</div>
</body>
</html>